﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<dynamic>" %>
<%if (ViewData["HomeNews"] != null)
  {
      List<sp_GetTopNewResult> listNews = (List<sp_GetTopNewResult>)ViewData["HomeNews"];
      if (listNews.Count > 0)
      {
          sp_GetTopNewResult objFirst = listNews[0]; %>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
    <tr>
        <td colspan="5" height="15">
        </td>
    </tr>
    <tr>
        <td width="2%" rowspan="5">
            &nbsp;
        </td>
        <td width="52%" rowspan="5">
        <%string image = objFirst.Image;
          if (string.IsNullOrEmpty(image))
          {
              image = "NoImage.jpg";
          }  %>
            <img src="<%=Constants.UPLOAD_IMAGE_PATH + image %>" width="370" height="247"
                alt="" />
        </td>
        <td width="1%" rowspan="5">
            &nbsp;
        </td>
        <td width="43%" class="style">
            <span class="style4a"><strong>
                <a href="<%=FRouter._("tintuc",objFirst.ID.ToString(),objFirst.Title) %>" class="textlink3">                            
                <%=objFirst.Title%></a></strong></span><br />
            <%=CommonFunc.SubStringRoundWord(objFirst.Description, Constants.NEWS_ROUND_WORLD_HOME_PAGE)%>
        </td>
        <td width="2%" rowspan="5">
            &nbsp;
        </td>
    </tr>
    <tr>
        <td height="5">
        </td>
    </tr>
    <tr>
        <td class="br4" height="1">
        </td>
    </tr>
    <tr>
        <td height="5">
        </td>
    </tr>
    <tr>
        <td>
            <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <%for (int i = 1; i < listNews.Count; i++)
                  {
                      sp_GetTopNewResult obj = listNews[i];%>
                <tr>
                    <td width="4%">
                        <img src="../../Themes/images/h_8.jpg" width="8" height="10" />
                    </td>
                    <td width="96%" align="left">
                        <a href="<%=FRouter._("tintuc",obj.ID.ToString(),obj.Title) %>" class="textlink3">
                            <%= obj.Title%></a>
                    </td>
                </tr>
                <%} %>
            </table>
        </td>
    </tr>
    <tr>
        <td colspan="5" height="15">
        </td>
    </tr>
</table>
<%}
  }%>